package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotGuestCheckinMapper;
import com.gaohe.hotal.domain.HotGuestCheckin;
import com.gaohe.hotal.service.IHotGuestCheckinService;

/**
 * 客户入住Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotGuestCheckinServiceImpl implements IHotGuestCheckinService 
{
    @Autowired
    private HotGuestCheckinMapper hotGuestCheckinMapper;

    /**
     * 查询客户入住
     * 
     * @param checkinId 客户入住主键
     * @return 客户入住
     */
    @Override
    public HotGuestCheckin selectHotGuestCheckinByCheckinId(Long checkinId)
    {
        return hotGuestCheckinMapper.selectHotGuestCheckinByCheckinId(checkinId);
    }

    /**
     * 查询客户入住列表
     * 
     * @param hotGuestCheckin 客户入住
     * @return 客户入住
     */
    @Override
    public List<HotGuestCheckin> selectHotGuestCheckinList(HotGuestCheckin hotGuestCheckin)
    {
        return hotGuestCheckinMapper.selectHotGuestCheckinList(hotGuestCheckin);
    }

    /**
     * 新增客户入住
     * 
     * @param hotGuestCheckin 客户入住
     * @return 结果
     */
    @Override
    public int insertHotGuestCheckin(HotGuestCheckin hotGuestCheckin)
    {
        hotGuestCheckin.setCreateTime(DateUtils.getNowDate());
        return hotGuestCheckinMapper.insertHotGuestCheckin(hotGuestCheckin);
    }

    /**
     * 修改客户入住
     * 
     * @param hotGuestCheckin 客户入住
     * @return 结果
     */
    @Override
    public int updateHotGuestCheckin(HotGuestCheckin hotGuestCheckin)
    {
        hotGuestCheckin.setUpdateTime(DateUtils.getNowDate());
        return hotGuestCheckinMapper.updateHotGuestCheckin(hotGuestCheckin);
    }

    /**
     * 批量删除客户入住
     * 
     * @param checkinIds 需要删除的客户入住主键
     * @return 结果
     */
    @Override
    public int deleteHotGuestCheckinByCheckinIds(Long[] checkinIds)
    {
        return hotGuestCheckinMapper.deleteHotGuestCheckinByCheckinIds(checkinIds);
    }

    /**
     * 删除客户入住信息
     * 
     * @param checkinId 客户入住主键
     * @return 结果
     */
    @Override
    public int deleteHotGuestCheckinByCheckinId(Long checkinId)
    {
        return hotGuestCheckinMapper.deleteHotGuestCheckinByCheckinId(checkinId);
    }
}
